<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
    <meta charset="UTF-8">
    <title>房屋租赁系统</title>
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="js/jquery-ui-datepicker.js"></script>
    <script type="text/javascript" src="js/jquery.validate.min.js"></script>
    <link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/>
    <style>
        .error {
            font-size: 13px;
            color: red;
        }

        .result-wrap {
            border-bottom: none;
        }

    </style>
    <script type="text/javascript">
        $().ready(function () {
            // 在键盘按下并释放及提交后验证提交表单

            $("#date").datepicker();
            $("#myform").validate({

                rules: {
                    title: {
                        required: true
                    },
                    content: {
                        required: true
                    },
                    infotype: {
                        required: true
                    }
                },
                messages: {
                    title: {
                        required: "标题不能为空"
                    },
                    content: {
                        required: "信息内容不能为空"
                    },
                    infotype: {
                        required: "信息分类不能为空"
                    }
                }
            });
        })
    </script>

</head>
<body>

<div class="result-title">
    <h1>添加帮助信息</h1>
</div>
<div class="result-content">
    <div class="sidebar-title">
        <form action="/help/addorupdate.action" method="post" id="myform" name="myform"
              enctype="multipart/form-data">
            <table class="insert-tab" width="100%">
                <tbody>
                <tr>
                    <th><i class="require-red">*</i>信息分类：</th>
                    <td>
                        <input class="common-text required" value="${helpInfo.infotype}"
                               id="infotype"
                               name="infotype" size="50" type="text">
                    </td>
                </tr>
                <tr>
                    <th><i class="require-red">*</i>标题标题：</th>
                    <td><input class="common-text" name="title" value="${helpInfo.title }"
                               id="title" size="50" type="text"></td>
                </tr>

                <tr>
                    <th><i class="require-red">*</i>信息内容：</th>
                    <td><textarea class="common-text" name="content" id="content"
                                  style="width:50%;height:200px;">${helpInfo.content }</textarea>
                    </td>
                </tr>
                <input type="hidden" name="id" id="id"
                       value="${helpInfo.id}"/>
                <tr>
                    <th></th>
                    <td>
                        <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                        <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                    </td>
                </tr>
                <tr>
                    <font id="error" color="red">${error }</font>
                </tr>
                </tbody>
            </table>
        </form>
    </div>
</div>

</body>
</html>